#ifndef _3761_USERBUFFER_H_
#define _3761_USERBUFFER_H_
#include <string>
#include "userdata.h"
#include "packet.h"
using namespace std;


class UserBuffer : public UserData
{
public:
	uint8_t  data[1<<16];
	uint16_t length;
public:
	UserBuffer(void);
public:
	void clear(void);
	void push_back(uint8_t c);
	void pop_front(void);
public:
	bool check(void);
	bool packup(void) override; 
	bool unpack(void) override; 
	GB3761_Header& header(void);
public:
	string toStringF(void)const;
	string toStringU(void)const;
};


#endif//_3761_USERBUFFER_H_
